home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 25
/
CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso
/
CUCD
/
WWW
/
http
/
www.wirenet.co.uk
/
files
/
thor25_arexx.lha
/
BBSRead
/
SetLastRead.br
< prev
Wrap
Text File
|
1995-09-06
|
1KB
|
65 lines
/* SetLastRead.br
*
* Set last read pointers for a bbs.
*
* Script by: Eivind Nordseth, Ultima Thule Software.
*/
EVE_DOCOMMAND = 11 /* Command the script should do */
parse arg argument
if(argument = '') then
do
say '$VER: SetLastRead.br V3.1 (31.08.94)'
say 'Template: BBSNAME/A'
exit
end
if ~show('p', 'BBSREAD') then do
address command
"run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
"WaitForPort BBSREAD"
end
address BBSREAD
GETCONFLIST stem CONFLIST argument
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
do i=1 to CONFLIST.COUNT
GETCONFDATA argument '"'||CONFLIST.i||'"' stem CONFDATA
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
if CONFDATA.LASTMSG >= CONFDATA.FIRSTMSG then
do
say 'Setting last read for conference:' CONFLIST.i
READBRMESSAGE argument '"'||CONFLIST.i||'"' CONFDATA.LASTMSG headstem HEADTAGS
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
drop EVENT.
EVENT.COMMANDSTRING = "j " || CONFLIST.i || " m s " || HEADTAGS.ORGINALNR
WRITEBREVENT argument EVE_DOCOMMAND stem EVENT
if(rc ~= 0) then
do
say BBSREAD.LASTERROR
exit
end
end
end